package com.doubao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.doubao.entity.UserDeviceCollection;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserDeviceCollectionMapper extends BaseMapper<UserDeviceCollection> {

    @Update("UPDATE user_device_collection SET status = #{status} " +
            "WHERE user_id = #{userId} AND device_id = #{deviceId}")
    int updateCollectionStatus(@Param("userId") Long userId,
                             @Param("deviceId") Long deviceId,
                             @Param("status") Integer status);
}
